struct Solution {}

fn main() {}

impl Solution {
    pub fn check_record(s: String) -> bool {
        let absent_cnt_lower_than_2: bool = (s.chars().filter(|&c| c == 'A' ).count() as i32) < 2;
        let late_lower_than_3: bool = !s.contains("LLL");
        absent_cnt_lower_than_2 && late_lower_than_3
    }
}